﻿using clawSoft.clawPDF.Shared.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace clawSoft.clawPDF.Shared.Views.ActionControls
{
    /// <summary>
    /// HttpActionControl.xaml 的交互逻辑
    /// </summary>
    public partial class HttpActionControl : ActionControl
    {
        public HttpActionControl()
        {
            InitializeComponent();

            DisplayName =
                TranslationHelper.Instance.TranslatorInstance.GetTranslation("HttpActionSettings", "DisplayName",
                    "Upload with HTTP");
            Description = TranslationHelper.Instance.TranslatorInstance.GetTranslation("HttpActionSettings",
                "Description", "The HTTP action allows to upload the created documents to a server via HTTP.");

            TranslationHelper.Instance.TranslatorInstance.Translate(this);
        }

        public override bool IsActionEnabled
        {
            get
            {
                if (CurrentProfile == null)
                    return false;
                return CurrentProfile.Http.Enabled;
            }
            set => CurrentProfile.Http.Enabled = value;
        }
    }
}
